package tech.aistar.corejava.day08.factory;

//静态导入 - 导入静态的
import static tech.aistar.corejava.day08.factory.MyBeanFactory.*;

/**
 * @author success
 * @version 1.0
 * @description:本类用来演示:
 * @date 2019/7/24 0024
 */
public class TestFactory {
    public static void main(String[] args) {
        IUserDao u1 = MyBeanFactory.getInstance(2);

        //使用常量来提高程序的可读性
        //此处传参也是可以使用静态导入的语法
        //IUserDao u2 = MyBeanFactory.getInstance(MyBeanFactory.V_TWO);

        //使用静态导入
        IUserDao u2 = MyBeanFactory.getInstance(V_TWO);

    }
}
